var AddFieldPage = {
	// 保存
	'save': function() {
		if ($("#editFieldFrm").formValidate()) {
			saveFieldAjax.send();
		}
	},
	'onPrimaryKeyValueChanged': function(ele) {
		var isPrimaryKey = $("#editFieldFrm").find("input:checked[name='isPrimaryKey']").val();
		if (isPrimaryKey == '1') {
			$("#editFieldFrm").find("input[name='allowNull']").filter("[value='0']").prop("checked", true);
			$.messager.info("当字段为主键时，该字段必定是非空字段！");
		}
	},
	// 保存成功回调
	'saveSucc': function(data, status, xhr) {
		$.messager.info(data.message);
		var mWindow = MsgBox.getCurrentOpenDialogWindow();
		mWindow.tableFieldDatatable.refresh();
		MsgBox.closeActiveDialog();
	},
	// 查询单条字段成功回调
	'onFindFieldSucc': function(data, status, xhr) {
		$("#editFieldFrm").autofill(data.info);
	}
};